package com.mhy.mvc.controller;

import com.mhy.mvc.pojo.Dog;
import com.mhy.mvc.pojo.User;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/users")
public class UserController {

    @RequestMapping(value = "/hello", produces = {"text/html;charset=UTF-8;", "application/json;"})
    public String hello() {
        return "Hello Spring 莫皓宇!";
    }

    @RequestMapping("/user")
    public User getUser() {
        return new User(1,"哈哈哈","123456",null,new Dog("乐",18));
    }
}
